﻿<script src="http://www.12301.cc/js/jsorder.js"></script>
<?if($_SESSION['account']=='csj1' || $_SESSION['account']=='124254'){}else{?>
<script src="http://www.12301.cc/wx_public/zclip/jquery.zclip.min.js"></script>
<?}?>
<script src="http://www.12301.cc/module/pwk/jquery.confirm/jquery.confirm.js"></script>
<script src="http://www.12301.cc/module/zax/order_report/weekSales.js"></script>
<link rel="stylesheet" type="text/css" href="//www.12301.cc/module/pwk/jquery.confirm/jquery.confirm.css" />
<link rel="stylesheet" type="text/css" href="http://www.12301.cc/css/member.css"/>
<div class="con_memb">
    <!--个人信息-->
    <div class="conm_box setCode">
        <div class="conmb_img">
            <a href="account_info.html"><img src="<?=$m_info['headphoto']?$m_info['headphoto']:"images/touxiang.png"?>" onerror="javascript:this.src='http://www.12301.cc/images/sorry_pic.png'"class="touxiang" /></a>
            <a href="avatar.html">修改头像</a>
        </div>
        <h4><?=$m_info['cname']?><span class="passport">(ID:<?=$m_info['account']?>)</span>
            <?php if($_SESSION['dtype']!=6) echo '<span class="marlf30"><a href="enterprise_info.html"><span class="iconfont">&#xe684;</span>编辑</a></span>';?>
        </h4>
        <!-- <p>认证：
            <span class="emailn">邮件</span>
            <span class="teln">手机</span>
            <span class="bankn">银行</span>
            <span class="zfbn">支付宝</span>
        </p> -->
        <p><span>绑定手机：<?=$m_info['mobile']?></span></p>
        <?if(!$m_info['alipay']){?>
        <p style="color:red">您还未绑定支付宝账号 <a href="account_info.html">点击绑定</a></p>
        <?}else{?>
        <p><span>支付宝账号：<?=$m_info['alipay']?></span></p>
        <?}?>
        <p>最近登陆时间：<?=$m_info['lasttime']?></p>
        <!-- <p>所属联盟：先行联盟</p> -->
        <?php if($_SESSION['dtype']!=6) echo '<p><a href="chPs.html" class="mem_pawda">密码修改</a></p>';?>
        <p style=" height:13px;">&nbsp;</p>
        <div class="conmb_ma" id="conmb_ma">
            <img src="http://api.k780.com:88/?app=qr.get&data=http://<?=$_SESSION['account']?>.12301.cc/wx/html/productlist.html&level=H&size=8" class="touxiang_a" />
            <p style="height: 20px"><a href="#" id="click_copy" data-link="http://<?=$_SESSION['account']?>.12301.cc">复制链接</a></p>
            <p>扫码进入商家店铺</p>
            <!-- <a href="?act=download&txt=http://<?=$_SESSION['account']?>.12301.cc/wx/html/productlist.html">下载二维码</a> -->

        </div>
    </div>

    <?if($_SERVER['HTTP_HOST']=='www.12301.cc'):?>
    <input type="hidden" class="type_chormo" value="1">
    <?else:?>
    <input type="hidden" class="type_chormo" value="2">
    <?endif;?>
    <?if(!$access['yd'] && $_SESSION['dtype']!=6 && $_SESSION['sid']!=55):?>
    <div class="conm_box conm_box2 yuer">
        <h4>我的资产</h4>
        <p>总资产：<span class="redn">0</span>元</p>
        <p>
            账户余额：<span class="redn"><?=$v['money']?></span>元&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <!--<a href="recharge.html" target="_blank" class="recharge"></a>
            <a href="withdraw.html" target="_blank" class="recharge withdraw"></a>-->
        </p>
        <p>
            冻结金额：<span class="redn">0</span>元
        </p>
        <p>
            提现冻结金额：<span class="redn">0</span>元
        </p>
    </div>
    <!--交易管理-->
    <div class="conm_box conm_box2 yuer">
        <h4>交易管理</h4>
        <p>
            账户余额：<span class="redn"><?=$v['money']?></span>元&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="recharge.html" target="_blank" class="recharge"></a>
            <a href="withdraw.html" target="_blank" class="recharge withdraw"></a></br></br>

            <span class="mal100">余额预警开关：</span>
                <span class="yujbtn <?if($cordon) echo 'onyuj'?>" id="yuj" onclick="yue(this);"><!--onyuj-->
                </span>
            <span class="red" id="yufz">预警阈值为<span id="monnum"><?=$cordon?></span>元<a href="#" onClick="locking();">修改</a></span>
        </p>
    </div>

    <!--平台收费信息-->
    <?if($m_info['dtype']==0):?>
    <div class="conm_box conm_box2 fee">
        <h4>平台收费信息</h4>
        <p>
            <?if($m_info['fee_platform']>0):?>
            <span>平台使用费：<?=$m_info['fee_platform']/100?>元/订单</span>
            <?endif;?>
            <?if($m_info['fee_bank']>0):?>
            <span>支付手续费：<?=$m_info['fee_bank']?>‰</span>
            <?endif;?>
            <?if($m_info['fee_sms']>0):?>
            <span>短信收费：<?=$m_info['fee_sms']/100?>元/条(66个字符算一条)</span>
            <?endif;?>
        </p>
        <p>
            <?if($m_info['fee_code']>0):?>
            <span>电子凭证费：<?=$m_info['fee_code']/100?>元/订单</span>
            <?endif;?>
        </p>
    </div>
    <?endif;?>
    <?endif;?>
    <?if($m_info['dtype']!=5):?>
    <!--店铺提醒-->
    <style>
        .setCode{position: relative;}
        #conmb_ma{position: absolute; top: 10px; right: 0;}
        .setPosition{position: relative; height: 120px;}
        .setP{position: absolute;}
    </style>
    <div class="conm_box conm_box2 setPosition">
        <h4>店铺提醒
            <a href="?d=today">今天</a>
            <a href="?d=yesterday">昨天</a>
            <a href="?d=week" >本周</a>
            <a href="?d=lastWeek">上周</a>
            <a href="?d=mon">本月</a>
            <a href="?d=lastMon">上月</a>
        </h4>
        <?if($m_info['dtype']==0&&$m_info['status']==0&&$v['pnums']==0){?>
        <p><?$_SESSION['alliance']? '':'您还未发布产品信息，客户根本无法找到您。<a href="prod_type.html" class="redb">立即发布</a>';?></p>
        <?}?>
        <?if($_SESSION['dtype']==6):?>
        <p class="setP">
            <span class="redp"><a href="###"><?=$dayFlag?>销售订单数</a>(<?=$daySales[0]?>)</span>
            <span class="redp"><a href="###"><?=$dayFlag?>销售门票数</a>(<?=$daySales[1]?>)</span>
            <span class="redp"><a href="###"><?=$dayFlag?>销售金额</a>(<?=$daySales[2]/100?>)</span>
            <!--<span class="redp"><a href="business_list.html" target="_blank">介绍商家数量</a>(111)</span>-->
            <?if($m_info['dtype']==0){?>
            </br>
            <span class="redp"><a href="###">在售门票数</a>(<?=$v['uppronum']?>)</span>
            <!--<span class="redp"><a target="_blank" href="prodlists_s.html">仓库产品数</a>(<?//=$v['downpronum']?>)</span>-->
            <span class="redp"><a href="###">合作分销商数</a>(<?=$v['fxnum']?>)</span>
            <span class="redp"><a href="###">合作供应商数</a>(<?=$v['supplynum']?>)</span>
            <?}?>
        </p>
        <?else:?>
        <p class="setP">
            <span class="redp"><a target="_blank" href="orderReport.html?act=query&begintime=<?=$btime?>&endtime=<?=$etime?>"><?=$dayFlag?>销售订单数</a>(<?=$daySales[0]?>)</span>
            <span class="redp"><a target="_blank" href="orderReport.html?act=query&begintime=<?=$btime?>&endtime=<?=$etime?>"><?=$dayFlag?>销售门票数</a>(<?=$daySales[1]?>)</span>
            <span class="redp"><a target="_blank" href="orderReport.html?act=query&begintime=<?=$btime?>&endtime=<?=$etime?>"><?=$dayFlag?>销售金额</a>(<?=$daySales[2]/100?>)</span>
            <!--<span class="redp"><a href="business_list.html" target="_blank">介绍商家数量</a>(111)</span>-->
            <?if($m_info['dtype']==0){?>
            </br>
            <span class="redp"><a target="_blank" href="prodlists.html">在售门票数</a>(<?=$v['uppronum']?>)</span>
            <!--<span class="redp"><a target="_blank" href="prodlists_s.html">仓库产品数</a>(<?//=$v['downpronum']?>)</span>-->
            <span class="redp"><a target="_blank" href="partner.html">合作分销商数</a>(<?=$v['fxnum']?>)</span>
            <span class="redp"><a target="_blank" href="partner.html?dtype=1">合作供应商数</a>(<?=$v['supplynum']?>)</span>
            <?}?>
        </p>
        <?endif;?>
    </div>
    <?endif;?>
    <!--一周产品变化汇总-->
    <?if($m_info['dtype']==1) include("common/mod_prod_chg.php")?>

    <?if($m_info['dtype']!=5):?>
    <!--排行-->
    <div class="rank">
        <div class="ranktit">
            <a href="orderReport.html" target="_blank" class="more">更多>></a>
            <a class="bak bakh"><?=($m_info['dtype']==9)?"当":7?>日产品使用排行</a>

        </div>
        <div class="rankcon">
            <table class="ranktab">
                <thead id="rankhd">
                <th>序号</th>
                <th class="tL">产品名称</th>
                <th><span class="sort" onclick="sortTable('offmain',2, true ,this);">订单数</span></th>
                <th><span class="sort" onclick="sortTable('offmain',3, true ,this);">门票数</span></th>
                <th><span class="sort" onclick="sortTable('offmain',4, true ,this);">总金额</span></th>
                <?if(!$access['yd']):?>
                <th><span class="sort" onclick="sortTable('offmain',5, true ,this);">余额支付</span></th>
                <?endif;?>
                <th><span class="sort" onclick="sortTable('offmain',6, true ,this);">在线支付</span></th>
                <th><span class="sort" onclick="sortTable('offmain',7, true ,this);">授信支付</span></th>
                <th><span class="sort" onclick="sortTable('offmain',8, true ,this);">现场到付</span></th>
                </thead>
                <tbody id="offmain">
                <?/*foreach($weekSales as $lid=>$row):?>
                <tr>
                    <td><?=++$n?></td>
                    <td class="tL"><?=$row['title']?></td>
                    <td><?=$row['order']?></td>
                    <td><?=$row['tnum']?></td>
                    <td><?=$row['money']/100?></td>
                    <td><?=$row['pmode0']/100?></td>
                    <td><?=$row['pmode1']/100?></td>
                    <td><?=$row['pmode2']/100?></td>
                    <td><?=$row['pmode3']/100?></td>
                </tr>
                <?endforeach;*/?>
                </tbody>
            </table>
        </div>
    </div>
    <?endif;?>
    <?include("sale_reportz.html");//折线图?>
</div>
<div class="rig_memb">
    <?if(!$access['yd']):?>
    <div class="sidebar_rigm">
        <h4>系统通知</h4>
        <ul id="noticeList">数据加载中...</ul>
    </div>
    <div class="sidebar_rigm">
        <h4>系统更新公告&nbsp;&nbsp;&nbsp;<a class="not_more"href="version_list.html">更多</a></h4>
        <ul id="noticeList_l">
            <li><a href="noticedone.html" target="">数据加载中...</a></li>
        </ul>
    </div>
    <? $nosee = array(
        'ifzmp.12301.cc',//部分客户 不需要 右边的常见问题等页面
        'haopiao.12301.cc',
        'haiyuan.12301.cc', 
        '9117you.12301.cc',
        'hebei.12301.cc',
        'www.xpchong.com',
        'clhlpw.12301.cc',
		'www.16u.com'
    );
   if(in_array($h_config[$httphost]['host'],$nosee)){?>

    <div style="margin:10px 0;" >
    <img src="<?=$h_config[$httphost]['host']=='www.16u.com'?"images/img/img5.png":"images/img/kongbai.jpg"?>" width="200" height="260" />
    </div>
    <?}else{?>
    <div style=" margin:10px 0;" >
    <img class="pic_bo" src="<?=$h_config[$httphost]['host']=='ty.369trip.cn'?"images/img/gj.jpg":"images/img/img5.png"?>"  width="200" height="260" />
    </div>
    <!--     <div class="xian_join" id='xian'></div>-->
    <div class="sidebar_rigm_what">
    <span><p>帮助中心</p></span>
    <ul>
    <!--<li><a href="u/comque.html" target="_blank">票付通平台如何收费？</a></li>-->
    <li><a href="web/rebuild/yyl/help/help.html?pi=platform" target="_blank">关于票付通平台？</a></li>
    <li><a href="web/rebuild/yyl/help/help.html?pi=money" target="_blank">关于票付通平台资金问题？</a></li>
    <li><a href="web/rebuild/yyl/help/help.html?pi=code" target="_blank">平台/淘宝码商下单无法发码？</a></li>
    <li><a href="web/rebuild/yyl/help/help.html?pi=server_fail" target="_blank">终端连接服务器失败怎么办？</a></li>
    <li><a href="web/rebuild/yyl/help/help.html?pi=set_terminal" target="_blank">如何设置终端号？</a></li>
    <li><a href="web/rebuild/yyl/help/help.html?pi=Check_parameters" target="_blank">查看终端参数信息？</a></li>
    <li><a href="web/rebuild/yyl/help/help.html?pi=server_fail" target="_blank">票付通平台终端使用问题？</a></li>
    <!--<li><a href="u/comque9.html" target="_blank">平台支持哪些验票方式？</a></li>
    <li><a href="u/comque10.html" target="_blank">配套设备支持哪些通讯方式？</a></li>
    <li><a href="u/comque11.html" target="_blank">平台配套设备收费吗？</a></li> -->
    </ul>
    </div>
    <?}?>
    <?endif;?>
    <!--弹出窗口-->
    <div class="pakpopup" id="popup">
        <h4><a href="#" class="close" onClick="Lock_CheckForm();"></a>设置</h4>
        <div class="pkpcon">
            <form>
                <p>
                    余额预警阈值：
                <span class="pkpopint">
                    <span class="pkpopa">
                        <a href="#" class="up"></a>
                        <a href="#" class="down"></a>
                    </span>
                    <input type="text" class="pkpopit" id="pkpopit" onblur="kong();" value="<?=$cordon?>"/>
                </span>
                    元
                    <span class="poplight" id="poplight"><i></i>金额必须是大于0的整数</span>
                </p>
                <p class="gary">当余额少于该值时将会有短信提醒</p>
                <p style="height:26px; border-bottom:1px dashed #CCCCCC;">&nbsp;</p>
                <p>
                    <input type="button" class="popbtn1" />
                    <input type="button" class="popbtn2" onClick="Lock_CheckForm();" />
                </p>
            </form>
        </div>
    </div>
</div>
<div class="cl"></div>
</div>
<script>
    jQuery(document).ready(function($) {
        $.get('common/mod_notice.php', function(html){
            $("#noticeList").html(html);
        });
        jQuery(document).ready(function($) {
            var con_type_url = $(".type_chormo").val();
            if(con_type_url=="1"){
                var url_list = "http://www.12301.cc/call/version.php";
            }
            else{
                var url_list = "/new/d/call/version.php";
            }
            $.ajax({
                "url" : url_list,
                "data" : {action:'homeread',num:'10'},
                "dataType":"json",
                "type": 'POST',
                "success":function(data){
                    var contents="";
                    var list = data.list;
                    var suc = data.status;
                    if(suc=="fail"){
                        contents+='<li><a href="###">无更新</a></li>';
                    }
                    else{
                        for(var i in list){
                            var keywords =list[i]["uplog_title"];
                            var url =list[i]["uplog_content"];
                            var data =list[i]["access_date"];
                            var id = list[i]["id"];
                            contents+='<li><a   target="_blank" href="'+url+'">['+data+']'+keywords+'</a></li>';
                        }
                    }
                    $("#noticeList_l").html(contents);
                }
            });
        });
        $(".popbtn1").click(function(){
            var pkv = document.getElementById('pkpopit').value;
            if(parseInt(pkv)!=pkv || pkv <= 0){
                document.getElementById('poplight').style.display = 'inline';
                return false;
            }else{
                document.getElementById('poplight').style.display = 'none';
            }
            Lock_CheckForm();

            $.post('call/jh_mem.php',{'v':pkv,'action':'warning'}).done(function(response){
                if(response=='ok'){
                    //$(".pkpopit").val();
                    document.getElementById('yufz').style.display = "inline-block";
                    document.getElementById('yuj').className = "yujbtn onyuj";
                    document.getElementById('monnum').innerHTML = pkv;
                } else {
                    alert(response);
                }
            }).error(function(){
                alert('发生错误，无法保存号码');
            });
        });
    });
    function yue(ths){
        var yucln = ths.className;
        if(yucln == "yujbtn onyuj"){
            $.post('call/jh_mem.php',{'v':'0','action':'warning'}).done(function(response){
                if(response=='ok'){
                    document.getElementById('yufz').style.display = "none";
                    ths.className = "yujbtn";
                }
            }).error(function(){
                alert('发生错误，无法保存号码');
            });

        }else{
            locking();
        }
    }
    $(function(){
        $("#click_copy").zclip({
            path: "http://www.12301.cc/wx_public/zclip/ZeroClipboard.swf",
            copy: function(){
                return $(this).attr("data-link");
            },
            deforeCopy : function(){},
            afterCopy : function(){
                alert("已复制到剪贴板")
            }
        });
    });
    // $.ajax({
    // url:'//www.12301.cc/call/version.php',
    // data:{action:'homeread',num:"6"},
    // type:'POST',
    // success:function(data) {
    // $("#versionList").html(data);
    // }
    // })

    $(".rig_memb").on('click','#xian', function(){
        var params = {action:'home_ct_st'};
        $.post("//www.12301.cc/module/pwk/control/account_info_new.php", params, function(res){
            var arr=[];
            arr[0]="您还没有认证，是否去认证？";
            arr[1]="您已申请认证，请稍等客服审核通过认证后再申请加入联盟!";
            arr[2]="";
            arr[3]="您的认证已被拒绝，请检查认证资料重新申请";


            switch (res){
                case "1":
                    alert(arr[res]);
                    parent.location.href="http://www.12301.cc/home.html";
                    break;
                case 2:
                    parent.location.href="http://www.12301.cc/alliance_join.html?id=3779";
                    break;
                default:
                    $.confirm({
                        'title'     : '友情提示',
                        'message'   : arr[res],
                        'buttons'   : {
                            '去认证'   : {
                                'class' : 'blue',
                                'action': function(){
                                    parent.location.href="http://www.12301.cc/certifi.html";
                                }
                            },
                            '稍后'    : {
                                'class' : 'gray',
                                'action': function(){
                                }
                            }
                        }
                    });
                    break;
            }
        });})

</script>
<?if( 0 && !isset($_SESSION['dataInited']) ):?>
<script>
    jQuery(document).ready(function($) {
        $.getJSON('call/dataInit.php',function(data){
            //console.log(data);
        });
    });
</script>
<?endif;?>
